Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Properly update the threads table when thread events are redacted #14248

Merged
merged 11 commits into from
Oct 21, 2022

Conversation

clokep
Copy link
Member

@clokep clokep commented Oct 20, 2022

When the last event in a thread was redacted we were not properly updating the threads table to either:

  • Find the new latest event in the thread and store it into the table; or
  • Removing the thread from the table if it is no longer a thread (i.e. all events in the thread were redacted).

Fixes #14241

@clokep
Copy link
Member Author

clokep commented Oct 20, 2022

I'd like to get this into 1.70.0 so that I don't need to deal with trying to find threads which we failed to update properly, but I can likely write a migration to do that if necessary.

What do folks think?

Copy link
Contributor

@DMRobertson DMRobertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Still draft, sorry if this is premature.)

Seems reasonable to me (thank you for a neat commit history). I'd be okay to squeeze it into 1.70 but I'll let @erikjohnston have the final call there I think.

synapse/storage/databases/main/events.py Show resolved Hide resolved
synapse/storage/databases/main/events.py Show resolved Hide resolved
synapse/storage/databases/main/events.py Show resolved Hide resolved
@clokep clokep marked this pull request as ready for review October 20, 2022 18:25
@clokep clokep requested a review from a team as a code owner October 20, 2022 18:25
@clokep clokep requested review from erikjohnston and removed request for a team October 20, 2022 18:25
@erikjohnston
Copy link
Member

I'm also happy to put this in 1.70 if you're happy to do an RC2

@clokep clokep merged commit 4dd7aa3 into release-v1.70 Oct 21, 2022
@clokep clokep deleted the clokep/thread-redaction branch October 21, 2022 13:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants